/**
 * 
 */
package com.netprovider.user.service.baseinfo;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import com.netprovider.user.service.baseinfo.objects.User;
import com.netprovider.user.service.baseinfo.objects.Users;
@Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})
@Consumes({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})
public interface UserService {
	@GET 
	@Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})
	@Path("/searchuser/{userId}") 
    User searchUser(@PathParam("userId") String userId);
	
	@POST  
	@Consumes({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) 
	@Path("/adduser")  
    @NotNull @Valid//返回值不能为空
	Response addUser(@Valid User user);
	
	@DELETE  
	@Consumes({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})  
	@Path("/deleteuser/{userId}")  
	Response deleteUser(@PathParam("userId") String userId);
	
	@PUT  
	@Path("/updateuser")  
	@Consumes({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})  
    Response updateUser(User user);
	
	@GET  
	@Path("/getusers/startdate/{startDate}/enddate/{endDate}")  
	@Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})
    Users getUsers(@PathParam("startDate") String startDate ,@PathParam("endDate") String endDate);
}
